#pragma once
#include "basic/types.h"
#include "ground.h"
#include "obj.h"
#include "role.h"
#include "utils.h"
#include <memory>

struct Player {
  bool on_taxi() const;
  bool combating() const;
  float dist_ground(std::shared_ptr<Ground> ground) const;
  float dist_unit(const Role &role) const;
  float dist(float x, float y, float z) const;
  float x() const;
  float y() const;
  float z() const;
  float h() const;
  float v() const;
  uint32 hp() const;
  uint32 hp_max() const;
  uint32 mp() const;
  uint32 mp_max() const;
  uint32 level() const;
  uint32 casting() const;
  uint32 channel() const;
  uint8 backpack_num_slots() const;
  std::string name() const;
  uintptr ptr() const;
  ObjType type() const;
  uint32 index() const;
  uint64 tid1() const;
  uint64 tid2() const;
  uint64 id1() const;
  uint64 id2() const;
  Role role() const;
  // --- Constructors ---
  Player(uint64 base_, uint64 ptr);
  Player() = delete;
  Player(Player &&) = default;
  Player(const Player &) = default;
  Player &operator=(Player &&) = default;
  Player &operator=(const Player &) = default;
  ~Player();

private:
  uint64 base_;
  Obj obj_;
  Role role_;
  std::string name_;
};
